#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e3 + 10;
int arr[N];
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> arr[i];
		}
		sort(arr, arr + n);
		for (int i = 0; i < n-1; i++) {
			cout << arr[i] << " ";
		}
		cout << arr[n - 1];
		cout << endl;
	}
	return 0;
}